package com.example.demo.web;

import java.util.Date;

import com.example.demo.BaseController;
import com.example.demo.models.ListRequest;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("/api/test")
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class TestController extends BaseController {

    @GetMapping("/page")
    public ListRequest listRequests(ListRequest request) {
        request.setTime3(new Date());
        request.setTime4(System.currentTimeMillis());
        return request;
    }

}